package com.mxpio.erp.common.plan.entity;


import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mxpio.erp.common.jpa.policy.ResCodeGeneratorPolicy;
import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.entity.BaseEntity;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_PLAN_FACTORY_CALENDAR")
@Schema(description="工厂日历")
public class FactoryCalendar extends BaseEntity {

	private static final long serialVersionUID = 1L;
	
	@Id
	@Generator(policy = ResCodeGeneratorPolicy.class)
	@Column(name = "CALENDAR_CODE_", updatable = false)
	@Schema(description = "日历编号-自动生成")
	private String calendarCode;
	
	@Column(name = "CALENDAR_NAME_")
	@Schema(description = "日历编号")
	private String calendarName;
	
	@Column(name = "CALENDAR_YEAR_")
	@Schema(description = "年份")
	private String year;
	
	@Column(name = "CALENDAR_STARTDAY_")
	@Schema(description = "起始日期")
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	private Date startDay;
	
	@Column(name = "CALENDAR_ENDDAY_")
	@Schema(description = "结束日期")
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	private Date endDay;
	
	@Column(name = "CALENDAR_DESC_")
	@Schema(description = "日历描述")
	private String calendarDesc;
	
	

}
